<?php
namespace model;
use model\DBConnection;
use PDOException;
use \PDO;
class Query {
	public static function updateTeritory($game_id, $teritory_id, $player_id) {
		echo"ihhha";
		try {
			$connection = DBConnection::getDBConnection();
			$statement = "insert into teritory_distribution (game_id, teritory_id, player_id)
							values(:GAME, :TERITORY, :PLAYER)";
			$stmt = $connection->prepare($statement);
			$stmt->bindValue(":GAME", $game_id, PDO::PARAM_STR);
			$stmt->bindValue(":TERITORY", $teritory_id, PDO::PARAM_STR);
			$stmt->bindValue(":PLAYER", $player_id, PDO::PARAM_STR);
			$stmt->execute();
		
		} catch (PDOException $e) {
			echo $e->getMessage();
		}
	}
}